package mspbots.next.ticket.core.data.rejects;

import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import mspbots.next.ticket.core.AbstractToolsUtil;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * com.mspbots.ticket.core.rejects.RejectServiceImpl
 *
 * @author Alex bob(https://github.com/vnobo)
 * @date Created by 2020/4/24
 */
@Log4j2
@Service
@RequiredArgsConstructor
public class RejectServiceImpl extends AbstractToolsUtil implements RejectService {

    private final RejectRepository rejectRepository;

    @Override
    public Flux<Reject> findNewest(Long tenantId) {
        return this.rejectRepository.findNewest(tenantId);
    }

    @Override
    public Mono<Reject> save(Reject reject) {
        return this.rejectRepository.save(reject);
    }


}
